function J = Jacobian(S, alpha, beta, xi, mu, mu_s)
    x = S(1); y = S(2); z = S(3);
    % —— 对 dx/dS 的偏导 —— 
    dfdx = -alpha*( -1 + (y-x) + (y-x)^2 );
    dfdy = -alpha*(  1 - (y-x) - (y-x)^2 );
    dfdz = -alpha*beta*cos(z);
    % —— 对 dy/dS 的偏导 —— 
    dgdx =   -1 + (y-x) + (y-x)^2;
    dgdy = -xi + (  1 - (y-x) - (y-x)^2 );
    dgdz =   0;
    % —— 对 dz/dS 的偏导 —— 
    dhdx =   mu;
    dhdy =   0;
    dhdz =   0;
    J = [dfdx, dfdy, dfdz;
         dgdx, dgdy, dgdz;
         dhdx, dhdy, dhdz];
end
